import request from '@/utils/request'
// 获取公司组织架构
export function getdepartmentslist(id) { // 加参数 Authorization 在request
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

export function removedepartments(id) { // 加参数 Authorization 在request
  return request({
    // url: '/company/department/{id}',
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}

// 获取新增部门
export function adddepartments(data) { // 加参数 Authorization 在request
  return request({
    // url: '/company/department/{id}',
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 根据id获取查看部门数据接口
export function getdeptsmentsbyid(id) { // 加参数 Authorization 在request
  return request({
    // url: '/company/department/{id}',
    url: '/company/department/' + id
    // method: 'POST'

  })
}
// 根据id进行部门编辑
export function editdeptsmentsbyid(data) { // 加参数 Authorization 在request
  return request({
    // url: '/company/department/{id}',
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}
